<!--
 * @Author: whq
 * @Date: 2025-03-16 10:39:37
 * @LastEditTime: 2025-03-23 17:36:07
 * @LastEditors: whq
 * @Description: 
 * @FilePath: \uniapp_build_mate_profit_mini\pagesPayment\index.vue
-->
<template>
  <view class="container" v-if="onLoadOption">
    <scroll-view class="h100" scroll-y="true">
      <PaymentList
        v-if="onLoadOption?.type == 'outStockPayment'"
        class="h100"
        @onButtonClick="onButtonClick"
        :pageData="onLoadOption"
        @onItemClick="(e) => paymentListHanderEvent('itemClick', 'outStockPayment', e)"
      />
      <PaymentList
        v-if="onLoadOption?.type == 'inStockPayment'"
        class="h100"
        @onButtonClick="onButtonClick"
        :pageData="onLoadOption"
        @onItemClick="(e) => paymentListHanderEvent('itemClick', 'inStockPayment', e)"
      />
    </scroll-view>
  </view>
</template>

<script setup>
import { ref, reactive, computed, watch, onMounted, nextTick } from "vue";
import { onLoad, onUnload } from "@dcloudio/uni-app";
import PaymentList from "@/components/TBMComponents/PaymentList/index.vue";
const onLoadOption = ref(null);

const eventDateHandle = (eType, eData) => {};
const onButtonClick = (listData) => {
  console.log(listData, "====listData===listData");
};
const paymentListHanderEvent = async (eType, eStatusType, eData) => {
  switch (eType) {
    // 点击每一项触发
    case "itemClick":
      break;
    default:
      break;
  }
};
const getInit = async () => {};
// 页面加载
onLoad((option) => {
  console.log(option, "=====option");

  onLoadOption.value = option;
});

// 页面挂载

onMounted(() => {
  getInit();
});
</script>

<style lang="scss" scoped>
.h100 {
  height: 100%;
}

.container {
  height: 100vh;
  background-color: #f8f8f8;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
</style>
